home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / sox.zip / SOX.DOC < prev    next >
Text File  |  1992-06-15  |  15KB  |  397 lines

  1.  
  2.  
  3.  
  4. SOX(1)                   USER COMMANDS                     SOX(1)
  5.  
  6.  
  7.  
  8. NAME
  9.      sox - SOund eXchange - universal sound sample translator
  10.  
  11. SYNOPSIS
  12.      sox infile outfile
  13.      sox infile outfile [ effect [ effect options ... ] ]
  14.      sox infile -e effect [ effect options ... ]
  15.      sox [ general options  ] [ format options  ] ifile [  format
  16.      options  ] ofile [ effect [ effect options ... ] ]
  17.      General options: [ -V ] [ -v volume ]
  18.      Format options: [ -t filetype ] [ -r rate ] [ -s/-u/-U/-A  ]
  19.      [ -b/-w/-l/-f/-d/-D ] [ -c channels ] [ -x ]
  20.      Effects:
  21.           copy
  22.           rate
  23.           avg
  24.           stat
  25.           echo delay volume [ delay volume ... ]
  26.           vibro speed [ depth ]
  27.           lowp center
  28.           band [ -n ] center [ width ]
  29.  
  30. DESCRIPTION
  31.      Sox translates sound files from one format to another,  pos-
  32.      sibly doing a sound effect.
  33.  
  34. OPTIONS
  35.      The option syntax is a little grotty, but in essence:
  36.           sox file.au file.voc
  37.      translates a sound sample in SUN Sparc  .AU  format  into  a
  38.      SoundBlaster .VOC file, while
  39.           sox -v 0.5 file.au -rate 12000 file.voc rate
  40.      does the same format translation but also lowers the  ampli-
  41.      tude by 1/2 and changes the sampling rate from 8000 hertz to
  42.      12000 hertz via the rate sound effect loop.
  43.  
  44.      File type options:
  45.  
  46.      -t filetype
  47.                gives the type of the sound sample file.
  48.  
  49.      -r rate   Give sample rate in Hertz of file.
  50.  
  51.      -s/-u/-U/-A
  52.                The sample data is signed linear (2's complement),
  53.                unsigned  linear,  U-law  (logarithmic),  or A-law
  54.                (logarithmic).  U-law and A-law are the  U.S.  and
  55.                international  standards for logarithmic telephone
  56.                sound compression.
  57.  
  58.      -b/-w/-l/-f/-d/-D
  59.                The sample data is in bytes, 16-bit words,  32-bit
  60.  
  61.  
  62.  
  63. Sun Release 4.1           Last change:                          1
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. SOX(1)                   USER COMMANDS                     SOX(1)
  71.  
  72.  
  73.  
  74.                longwords, 32-bit floats, 64-bit double floats, or
  75.                80-bit IEEE floats.  Floats and double floats  are
  76.                in native machine format.
  77.  
  78.      -x        The sample data is in XINU  format;  that  is,  it
  79.                comes  from a machine with the opposite word order
  80.                than yours and must be swapped  according  to  the
  81.                word-size  given  above.   Only  16-bit and 32-bit
  82.                integer  data  may  be  swapped.    Machine-format
  83.                floating-point  data is not portable.  IEEE floats
  84.                are a fixed, portable format. ???
  85.  
  86.      -c channels
  87.                The number of sound channels  in  the  data  file.
  88.                This  may be 1, 2, or 4; for mono, stereo, or quad
  89.                sound data.
  90.  
  91.      General options:
  92.  
  93.      -e        after the input file allows you to avoid giving an
  94.                output file and just name an effect.  This is only
  95.                useful with the stat effect.
  96.  
  97.      -v volume Change amplitude (floating point); less  than  1.0
  98.                decreases,  greater  than 1.0 increases.  Note: we
  99.                perceive  volume  logarithmically,  not  linearly.
  100.                Note: see the stat effect.
  101.  
  102.      -V        Print a description of processing phases.   Useful
  103.                for  figuring out exactly how sox is mangling your
  104.                sound samples.
  105.  
  106.      The input and output files may be standard input and output.
  107.      This  is specified by '-'.  The -t type option must be given
  108.      in this case, else sox will not know the format of the given
  109.      file.   The  -t,  -r,  -s/-u/-U/-A, -b/-w/-l/-f/-d/-D and -x
  110.      options refer to the input data when given before the  input
  111.      file name.  After, they refer to the output data.
  112.  
  113.      If you don't give an output file name, sox  will  just  read
  114.      the  input  file.   This is useful for validating structured
  115.      file formats; the stat effect may also be used  via  the  -e
  116.      option.
  117.  
  118. FILE TYPES
  119.      Sox needs to know the formats of the input and output files.
  120.      File  formats which have headers are checked, if that header
  121.      doesn't seem right, the program exits  with  an  appropriate
  122.      message.  Currently, the raw (no header), IRCAM Sound Files,
  123.      Sound Blaster, SPARC .AU (w/header), Mac HCOM, PC/DOS  .SOU,
  124.      Sndtool,  and  Sounder, NeXT .SND, Windows 3.1 RIFF/WAV, and
  125.      Amiga/SGI AIFF and 8SVX formats are supported.
  126.  
  127.  
  128.  
  129. Sun Release 4.1           Last change:                          2
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. SOX(1)                   USER COMMANDS                     SOX(1)
  137.  
  138.  
  139.  
  140.      .aiff     AIFF files used on Amiga and SGI.  Note: the  AIFF
  141.                format  supports only one SSND chunk.  It does not
  142.                support multiple sound chunks, or the 8SVX musical
  143.                instrument  description  format.   AIFF  files are
  144.                multimedia archives  and  and  can  have  multiple
  145.                audio and picture chunks.  You may need a separate
  146.                archiver to work with them.
  147.  
  148.      .au       SUN Microsystems AU files.  There  are  apparently
  149.                many  types of .au files; DEC has invented its own
  150.                with a different magic number and word order.  The
  151.                .au  handler  can  read  these  files but will not
  152.                write them.  Some .au files have valid AU  headers
  153.                and some do not.  The latter are probably original
  154.                SUN u-law 8000 hz samples.   These  can  be  dealt
  155.                with using the .ul format (see below).
  156.  
  157.      .hcom     Macintosh HCOM files.  These are (apparently)  Mac
  158.                FSSD  files  with some variant of Huffman compres-
  159.                sion.  The Macintosh has wacky  file  formats  and
  160.                this  format handler apparently doesn't handle all
  161.                the ones it should.   Mac  users  will  need  your
  162.                usual  arsenal  of file converters to deal with an
  163.                HCOM file under Unix or DOS.
  164.  
  165.      .raw      Raw files (no header).
  166.                The sample rate, size (byte, word, etc), and style
  167.                (signed,  unsigned,  etc.) of the sample file must
  168.                be given.  The number of channels defaults to 1.
  169.  
  170.      .ub, .sb, .uw, .sw, .ul
  171.                These are several suffices which serve as a short-
  172.                hand  for  raw  files with a given size and style.
  173.                Thus,  ub,  sb,  uw,  sw,  and  ul  correspond  to
  174.                "unsigned  byte",  "signed byte", "unsigned word",
  175.                "signed word", and "ulaw" (byte).  The sample rate
  176.                defaults to 8000 hz if not explicitly set, and the
  177.                number of channels  (as  always)  defaults  to  1.
  178.                There are lots of Sparc samples floating around in
  179.                u-law format with no header and fixed at a  sample
  180.                rate   of  8000  hz.   (Certain  sound  management
  181.                software cheerfully ignores  the  headers.)  Simi-
  182.                larly,  most  Mac sound files are in unsigned byte
  183.                format with a sample rate of 11025 or 22050 hz.
  184.  
  185.      .sf       IRCAM Sound Files.
  186.                SoundFiles are used  by  academic  music  software
  187.                such  as the CSound package, and the MixView sound
  188.                sample editor.
  189.  
  190.      .voc      Sound Blaster VOC files.
  191.                VOC  files  are  multi-part  and  contain  silence
  192.  
  193.  
  194.  
  195. Sun Release 4.1           Last change:                          3
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. SOX(1)                   USER COMMANDS                     SOX(1)
  203.  
  204.  
  205.  
  206.                parts,  looping,  and  different  sample rates for
  207.                different chunks.  On input, the silence parts are
  208.                filled  out,  loops  are rejected, and sample data
  209.                with a new sample rate is rejected.  Silence  with
  210.                a  different  sample  rate  is generated appropri-
  211.                ately.  On output, silence is  not  detected,  nor
  212.                are impossible sample rates.
  213.  
  214.      .wav      Windows 3.1 .WAV RIFF files.
  215.                These appear to be very similar to IFF files,  but
  216.                not  the same. They are the native sound file for-
  217.                mat of Windows 3.1.  Obviously, Windows 3.1 is  of
  218.                such  incredible importance to the computer indus-
  219.                try that it just had to have its  own  sound  file
  220.                format.
  221.  
  222. EFFECTS
  223.      Only one effect from the palette may be applied to  a  sound
  224.      sample.   To do multiple effects you'll need to run sox in a
  225.      pipeline.
  226.  
  227.      copy                          Copy the  input  file  to  the
  228.                                    output   file.   This  is  the
  229.                                    default effect if  both  files
  230.                                    have  the  same sampling rate,
  231.                                    or the rates are "close".
  232.  
  233.      rate                          Translate input sampling  rate
  234.                                    to  output  sampling  rate via
  235.                                    linear  interpolation  to  the
  236.                                    Least  Common  Multiple of the
  237.                                    two sampling rates.   This  is
  238.                                    the  default effect if the two
  239.                                    files have different  sampling
  240.                                    rates.    This   is  fast  but
  241.                                    noisy.
  242.  
  243.      avg                           Mix 4- or 2-channel sound file
  244.                                    into  2-  or 1-channel file by
  245.                                    averaging the samples for dif-
  246.                                    ferent speakers.
  247.  
  248.      stat                          Do a statistical check on  the
  249.                                    input  file, and print results
  250.                                    on the  standard  error  file.
  251.                                    stat   may   copy   the   file
  252.                                    untouched from input  to  out-
  253.                                    put,  if  you select an output
  254.                                    file. The "Volume Adjustment:"
  255.                                    field  in the statistics gives
  256.                                    you the  argument  to  the  -v
  257.                                    number  which  will  make  the
  258.  
  259.  
  260.  
  261. Sun Release 4.1           Last change:                          4
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. SOX(1)                   USER COMMANDS                     SOX(1)
  269.  
  270.  
  271.  
  272.                                    sample as loud as possible.
  273.  
  274.      echo [ delay volume ...  ]    Add echoing to a sound sample.
  275.                                    Each  delay/volume  pair gives
  276.                                    the delay in seconds  and  the
  277.                                    volume  (relative  to  1.0) of
  278.                                    that echo.  If the volumes add
  279.                                    up to more than 1.0, the sound
  280.                                    will melt down instead of fad-
  281.                                    ing away.
  282.  
  283.      vibro speed  [ depth ]        Add  the  world-famous  Fender
  284.                                    Vibro-Champ  sound effect to a
  285.                                    sound sample by using  a  sine
  286.                                    wave   as   the  volume  knob.
  287.                                    Speed gives the Hertz value of
  288.                                    the  wave.  This must be under
  289.                                    30.  Depth  gives  the  amount
  290.                                    the  volume is cut into by the
  291.                                    sine wave, ranging 0.0 to  1.0
  292.                                    and defaulting to 0.5.
  293.  
  294.      lowp center                   Apply a low-pass filter.   The
  295.                                    frequency response drops loga-
  296.                                    rithmically with  center  fre-
  297.                                    quency  in  the  middle of the
  298.                                    drop.  The slope of the filter
  299.                                    is quite gentle.
  300.  
  301.      band [ -n ] center [ width ]  Apply a band-pass filter.  The
  302.                                    frequency response drops loga-
  303.                                    rithmically around the  center
  304.                                    frequency.   The  width  gives
  305.                                    the slope of  the  drop.   The
  306.                                    frequencies  at center + width
  307.                                    and center  -  width  will  be
  308.                                    half  of their original ampli-
  309.                                    tudes.   Band  defaults  to  a
  310.                                    mode  oriented to pitched sig-
  311.                                    nals, i.e. voice, singing,  or
  312.                                    instrumental  music.   The  -n
  313.                                    (for noise)  option  uses  the
  314.                                    alternate  mode for un-pitched
  315.                                    signals.    Band    introduces
  316.                                    noise  in  the  shape  of  the
  317.                                    filter, i.e.  peaking  at  the
  318.                                    center  frequency and settling
  319.                                    around it.  Sox enforces  cer-
  320.                                    tain   effects.   If  the  two
  321.                                    files have different  sampling
  322.                                    rates,  the  requested  effect
  323.                                    must be one of copy, or  rate,
  324.  
  325.  
  326.  
  327. Sun Release 4.1           Last change:                          5
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334. SOX(1)                   USER COMMANDS                     SOX(1)
  335.  
  336.  
  337.  
  338.                                    If  the  two  files  have dif-
  339.                                    ferent  numbers  of  channels,
  340.                                    the   avg   effect   must   be
  341.                                    requested.
  342.  
  343. BUGS
  344.      The syntax is horrific.  It's very  tempting  to  include  a
  345.      default  system  that  allows  an effect name as the program
  346.      name and just pipes a sound sample from  standard  input  to
  347.      standard  output,  but  the  problem of inputting the sample
  348.      rates makes this unworkable.
  349.  
  350. FILES
  351. SEE ALSO
  352. NOTICES
  353.      The echoplex effect is:
  354.          Copyright (C) 1989 by Jef Poskanzer.
  355.          Permission to use, copy,  modify,  and  distribute  this
  356.      software and its
  357.          documentation for any purpose and without fee is  hereby
  358.      granted, provided
  359.          that the above copyright notice appear in all copies and
  360.      that both that
  361.          copyright notice and this permission  notice  appear  in
  362.      supporting
  363.          documentation.   This  software  is  provided  "as   is"
  364.      without express or
  365.          implied warranty.
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393. Sun Release 4.1           Last change:                          6
  394.  
  395.  
  396.  
  397.